using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using CMS.Domain.Entity;
using CMS.Infrastructrue.Persistence.Configuration.Base;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Metadata.Builders;

namespace CMS.Infrastructrue.Persistence.Configuration
{
    public class CMSExceptionLogConfiguration:BaseEntityConfiguration<CMSExceptionLog>
    {
        public override void Configure(EntityTypeBuilder<CMSExceptionLog> builder)
        {
            base.Configure(builder);
            
            builder.ToTable("cms_exceptionlog");

            builder.Property(x => x.ShortMessage).HasColumnName("short_message").HasMaxLength(2000).HasColumnOrder(1);
            builder.Property(x => x.FullMessage).HasColumnName("full_message").HasMaxLength(2000).HasColumnOrder(2);
            //public string ShortMessage { get; set; } = null!;
            // public string FullMessage { get; set; } = null!;
            // builder.Property(x=>x.Id).HasColumnName("register_id").HasColumnOrder(0);
        }
    }
}